<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="/WEB-INF/taglib/jstl.jsp" %>

<div id="loadPageNaviUrl" style="display:none;">${param.url}</div>
<div id="htmlPageNaviDiv" style="display:none;">${param.rtnDiv}</div>
<div id="frmPageNaviData" style="display:none;">${param.frmData}</div>
<div class="pageNavi">
	<c:set var="navi" value="${pageNavi}" />
	<c:set var="numbering" value="${navi.pageNumCol}" />
	
	<c:if test="${not empty numbering}" >
		<c:set var="prevFirst_ico" value="/resources/images/layouts/inc/prevFirst_ico.gif" />
		<c:set var="prev_ico" value="/resources/images/layouts/inc/prev_ico.gif" />
		<c:set var="next_ico" value="/resources/images/layouts/inc/next_ico.gif" />
		<c:set var="nextLast_ico" value="/resources/images/layouts/inc/nextLast_ico.gif" />
		<table>
		<tr>
			<td>
				<c:choose>
					<c:when test="${navi.currentBlock > 1}">
						<a href="${loadUrl}/1"><img src="${prevFirst_ico}" /></a>
					</c:when>
					<c:otherwise><img src="${prevFirst_ico}" /></c:otherwise>
				</c:choose>
			</td>
			<td style="width:2px;"></td>
			<td>
				<c:choose>
					<c:when test="${navi.currentBlock > navi.prevBlock}">
						<a href="${loadUrl}/${navi.prevBlock}"><img src="${prev_ico}" /></a>
					</c:when>
					<c:otherwise><img src="${prev_ico}" /></c:otherwise>
				</c:choose>
			</td>
			<td style="width:5px;"></td>
			
			<c:forEach var="num" items="${numbering}" varStatus="i">
			<c:if test="${i.count > 1}"><td style="width:2px;"></td></c:if>
			<td>
			<c:choose>
				<c:when test="${navi.currentPage == num}"> <div class="numberingOn">${num}</div> </c:when>
				<c:otherwise> <div class="numberingOff">${num}</div> </c:otherwise>
			</c:choose>
			</td>
			</c:forEach>
			
			<td style="width:5px;"></td>
			<td>
				<c:choose>
					<c:when test="${navi.currentBlock < navi.nextBlock}">
						<a href="${loadUrl}/${navi.nextBlock}"><img src="${next_ico}" /></a>
					</c:when>
					<c:otherwise><img src="${next_ico}" /></c:otherwise>
				</c:choose>
			</td>
			<td style="width:2px;"></td>
			<td>
				<c:choose>
					<c:when test="${navi.currentBlock < navi.lastBlock}">
						<a href="${loadUrl}/${navi.lastBlock}"><img src="${nextLast_ico}" /></a>
					</c:when>
					<c:otherwise><img src="${nextLast_ico}" /></c:otherwise>
				</c:choose>
			</td>
		</tr>
		</table>
	</c:if>
</div>
<script type="text/javascript" src="/resources/js/layouts/inc/pageNavigation.js"></script>